#include <iostream>
#include <vector>
#include <memory>
#include <cstdlib>
#include <ctime>



using namespace std;


class Animal {
 public:
    string name;
    Animal(string name):name(name) {}
    virtual void makeSound() const =0;
    virtual ~Animal() = default;
};

class Tiger :public  Animal {
public:
    Tiger (string name) :Animal(name) {}

    void makeSound() const override{
        cout<< name <<": ttiiggee"<<endl;
    }
};

class Elephant :public  Animal {
public:
    Elephant (string name) :Animal (name){}

   void makeSound() const override{
       cout<< name <<": eellppaanntt"<<endl;
    }
};

class Fox : public Animal {
public:
     Fox (string name):Animal(name) {}

     void makeSound() const override{
       cout<< name <<": ffooxx"<<endl;
    }
};
class Panda :public Animal {
public:
     Panda (string name) :Animal(name){}

     void makeSound() const override {
        cout<<name<<": ppaanndd"<<endl;
    }
};

int main(){
    srand(time(0));

    vector<unique_ptr<Animal>> animals;


    for (int i = 1; i <= 10; i++) {
        int animalType = rand() % 4;
        switch (animalType) {
            case 0:
                animals.emplace_back(make_unique<Tiger>("tiger-" + to_string(i)));
                break;
            case 1:
                animals.emplace_back(make_unique<Elephant>("elephant-" + to_string(i)));
                break;
            case 2:
                animals.emplace_back(make_unique<Fox>("fox-" + to_string(i)));
                break;
            case 3:
                animals.emplace_back(make_unique<Panda>("panda-" + to_string(i)));
                break;
        }

    }

    for (const auto& animal : animals) {
        animal->makeSound();
    }

    return 0;
}
